import request from '@/utils/request'

/**
 * 内容配置列表
 * @param {*} query 
 * @returns 
 */
export function ContentList(query) {
    return request({
        url: '/drill/content/list',
        method: 'get',
        params: query
    })
}

/**
 * 内容配置角色新增
 * @param {roleName,rescueTool,rescueSkill} data 
 * @returns 
 */
export function RoleNewAdd(data) {
    return request({
        url: '/drill/role',
        method: 'post',
        data: data
    })
}

/**
 * 内容配置角色编辑
 * @param {} data 
 * @returns 
 */
export function RoleNewUpdate(data) {
    return request({
        url: '/drill/role',
        method: 'put',
        data: data
    })
}

/**
 * 内容配置角色删除
 * @param {roleId} data 
 * @returns 
 */
export function roleDelete(roleId) {
    return request({
        url: '/drill/role/' + roleId,
        method: 'delete',

    })
}

/**
 * 内容配置分组新增
 * @param {groupName,deptIds} data 
 * @returns 
 */
export function GroupAdd(data) {
    return request({
        url: '/drill/group',
        method: 'post',
        data: data
    })
}

/**
 * 内容配置分组新增
 * @param {groupName,deptIds} data 
 * @returns 
 */
export function GroupUpdate(data) {
    return request({
        url: '/drill/group',
        method: 'put',
        data: data
    })
}

/**
 * 内容配置分组删除
 * @param {groupId} data 
 * @returns 
 */
export function groupDelete(groupId) {
    return request({
        url: '/drill/group/' + groupId,
        method: 'delete',

    })
}

/**
 * 人员添加
 * @param {userId,roleId,groupId} data 
 * @returns 
 */
export function StaffAdd(data) {
    return request({
        url: '/drill/PractsMember',
        method: 'post',
        data: data
    })
}

/**
 * 人员修改
 * @param {memberId,userId,roleId,groupId} data 
 * @returns 
 */
export function UpdateStaff(data) {
    return request({
        url: '/drill/PractsMember',
        method: 'put',
        data: data
    })
}

/**
 * 场景添加
 * @param {sceneTitle,sceneContent,problemConfig} data 
 * @returns 
 */
export function SceneAdd(data) {
    return request({
        url: '/drill/scene',
        method: 'post',
        data: data
    })
}

/**
 * 行动添加
 * @param {sceneId,actionTitle} data 
 * @returns 
 */
export function Action(data) {
    return request({
        url: '/drill/action',
        method: 'post',
        data: data
    })
}

/**
 * 场景添加
 * @param {actionId,sceneId,contentId,deptId,groupId,memberId,taskName} data 
 * @returns 
 */
export function ActionGroup(data) {
    return request({
        url: '/drill/ActionGroup',
        method: 'post',
        data: data
    })
}

// 删除行动
export function delAedattach(attachid) {
    return request({
        url: '/baseinfo/aedattach/' + attachid,
        method: 'delete'
    })
}

/**
 * 内容配置查询
 * @param {planId} query 
 * @returns 
 */
export function configDetails(planId) {
    return request({
        url: '/drill/content/selectMesByContentId/' + planId,
        method: 'get',
    })
}

/**
 * 内容添加接口
 * @param {*} data 
 * @returns 
 */
export function ConfigAdd(data) {
    return request({
        url: '/drill/content',
        method: 'post',
        data: data
    })
}

/**
 * 内容配置保存内容
 * @param {*} data 
 * @returns 
 */
export function ContentUpdate(data) {
    return request({
        url: '/drill/content',
        method: 'put',
        data: data
    })
}

/**
 * 内容添加接口
 * @param {actionGroupId} data 
 * @returns 
 */
export function ActionDelete(actionGroupId) {
    return request({
        url: '/drill/ActionGroup/' + actionGroupId,
        method: 'delete',

    })
}











